package com.kun.dd.service;

import com.kun.dd.annotation.DataSource;
import com.kun.dd.mapper.UserMapper;
import com.kun.dd.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fangkun
 * @create 2023-05-09-9:36
 */
@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    @DataSource(value = "slave")
    public List<User> getAllUsers(){
        return userMapper.getAllUsers();
    }
}
